package com.mt.api.modules.controller;

import com.mt.api.modules.domain.bo.AppReportCargoNoBo;
import com.mt.api.modules.service.AppReportService;
import com.mt.common.response.WebResponse;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: plover
 * @Date: 2020/07/15/3:35 下午
 * @Description:
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "报表")
@RequestMapping("/app/report")
public class AppReportController {

    private final AppReportService appReportService;

    /**
     * 每日款号销售量
     * @param reportCargoNoBo
     * @return
     */
    @GetMapping("/day/sales/cargono")
    public WebResponse getSalesByCargoNoAndPerDay(AppReportCargoNoBo reportCargoNoBo){
        return appReportService.getSalesByCargoNoPerDay(reportCargoNoBo);
    }


    /**
     * 每日销售量
     * @param reportCargoNoBo
     * @return
     */
    @GetMapping("/day/sales")
    public WebResponse getSalesPerDay(AppReportCargoNoBo reportCargoNoBo){
        return appReportService.getSalesPerDay(reportCargoNoBo);
    }

}
